package com.example.day22.ex02;

public class EatableDemo{
    public static void main(String[] args) {
        Eatable e= new EatableImpl();
        useEatable(new Eatable(){
            @Override
            public void eat(){
                System.out.println("一天一个苹果");
            }
        });
        useEatable(()->{
            System.out.println("一天一个苹果");
        });
    }
    private  static void useEatable(Eatable e){
        e.eat();
    }
}
